{% extends "bvblogapp/base.html" %}


{% block pageName %}BioVenturist - Company Search{% endblock %}

{% block queryScript %}
<link type="text/css" rel="stylesheet" href="/bvsearchapp/static/css/bvsearchapp.css"></link>
<link type="text/css" rel="stylesheet" href="/static/css/freebase-controls.css"></link>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script src="/static/js/freebase.suggest.js" type="text/javascript"></script>


<script type="text/javascript">
    function load_info(){};
    

    jQuery(document).ready(function() {
        
        var bioventurist_dir = '/base/bioventurist/';
        var options = {
            soft: true,
            ac_param: {
                type: [bioventurist_dir + "bv_medical_condition"],                                
                start: 0,
                limit: 30
            }
        };
        

        $('input#id_submit').click(function() {                
            if ($("#id_medical_condition").val()=="" && $("#id_technology_class").val()=="") {
                alert("You need to select a search criteria before proceedings.")
                return false;}
            else {
                $("form#set_filter").submit();
                return true;}               
            });
               
    $('#id_technology_class')
        .freebaseSuggest(options)       
        .focus(function(e) { $(this).val(""); options['ac_param']['type']=bioventurist_dir + "technology_class"; });
      
    $('#id_medical_condition')
        .freebaseSuggest(options)       
        .focus(function(e) { $(this).val(""); options['ac_param']['type']=bioventurist_dir + "bv_medical_condition"; });
        
        
    });
</script>

{% endblock %}

{% block container %}
<div id="col2">
<h1>Company Search</h1>

<h4>Find Companies that:</h4>

    <form name="set_filter" action="{% url companies_search %}" method="get">
<table class="set_filter">


    <tr>
        <td class="description">
            <p><label for="id_technology_class">have expertise in Technology:</label></p>
         </td>
        <td class="with_input_field right">
            <input type="text" size="15" name="filter_by_has_area_of_expertise" id="id_technology_class" />
        </td>
    </tr>
    <tr>
        <td colspan="2"><p class="center">and</p></td>
    </tr>    
    <tr>
        <td class="description">
            <p><label for="id_medical_condition">
                research treatments for Disease:
            </label></p>
        </td>
        <td class="with_input_field right">
            <input type="text" size="15" name="filter_by_has_develops_treatments_for_disease" id="id_medical_condition" />
        </td>
    </tr>

    <tr>
        <td colspan="2" class="right">
            <input type="submit" name="submit" id="id_submit" value="Go" />
        </td>
    </tr>
        
</table>
    </form>
</div>
{% endblock %}
